package com.renchi.menu.appmain;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.scheduling.annotation.EnableScheduling;

@ComponentScan(basePackages = {"com.*"}) //设置spring 注解扫描的范围 多个包路径用逗号隔开
@EntityScan(basePackages = {"com.renchi.menu"}) //设置entity的扫描路径
@EnableJpaRepositories(basePackages = {"com.renchi.menu"}) //设置dao的扫描路径，basePackages = {"",""}
@SpringBootApplication
@EnableScheduling
@EnableCaching //开启缓存
@Slf4j
public class MenuApplication {

    public static void main(String[] args) {
        SpringApplication.run(MenuApplication.class, args);
    }

}
